#include "head.h"

int main(int argc, char const *argv[])
{

    printf("main\n");
    // 判断命令行参数
    if (argc != 2)
    {
        printf("参数错误: %s ip port\n", argv[0]);
        return -1;
    }

    const char *db_name = "data/cloud_chat.db";
    sqlite3 *db = init_db(db_name);
    if (!db)
    {
        return EXIT_FAILURE;
    }
    create_table(db);

    // printf("id: %d\n", sql_get_id_by_username(db, "yml"));
    // printf("name :%s\n", sql_get_username_by_id(db, 4));
    reset_state(db, "off", "NUll", -1, -1);

  

    close_db(db);
     sever_main("10.0.0.63",argv[1]);

    return 0;
}
